using FluentValidation;
using Jupiter.Infrastructure.Domain;
using MediatR;

namespace Wips.AppService.Authorities.Menus.Requests
{
    /// <summary>
    /// 菜单状态变更请求类
    /// </summary>
    public class MenuStatusChangeRequest : IRequest<string>, ITxRequest
    {
        /// <summary>
        /// ID
        /// </summary>
        public string Id { get; set; }
    }

    /// <summary>
    /// 
    /// </summary>
    public class MenuStatusChangeValidator : AbstractValidator<MenuStatusChangeRequest>
    {
        /// <summary>
        /// 
        /// </summary>
        public MenuStatusChangeValidator()
        {
            RuleFor(p => p.Id)
                .Must(id => !string.IsNullOrEmpty(id))
                .WithMessage("ID不能为空");
        }
    }
}